/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.sys.service.job;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.service.TreeService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.hk.sys.entity.job.HkRecruitIndustry;
import com.thinkgem.jeesite.modules.hk.sys.dao.job.HkRecruitIndustryDao;

/**
 * 所属行业管理Service
 * @author 罗天文
 * @version 2018-06-15
 */
@Service
@Transactional(readOnly = true)
public class HkRecruitIndustryService extends TreeService<HkRecruitIndustryDao, HkRecruitIndustry> {

	public HkRecruitIndustry get(String id) {
		return super.get(id);
	}
	
	public List<HkRecruitIndustry> findList(HkRecruitIndustry hkRecruitIndustry) {
		if (StringUtils.isNotBlank(hkRecruitIndustry.getParentIds())){
			hkRecruitIndustry.setParentIds(","+hkRecruitIndustry.getParentIds()+",");
		}
		return super.findList(hkRecruitIndustry);
	}
	
	@Transactional(readOnly = false)
	public void save(HkRecruitIndustry hkRecruitIndustry) {
		super.save(hkRecruitIndustry);
	}
	
	@Transactional(readOnly = false)
	public void delete(HkRecruitIndustry hkRecruitIndustry) {
		super.delete(hkRecruitIndustry);
	}
	
}